<template>
  <div class='big-container'>
<h3>{{desc.title}}</h3>
<hr>
<div v-html='desc.content' class='container-img'></div>
  </div>
</template>

<script>
export default{//为模板提供数据的区域
    data(){
        return{
            id:this.$route.params.id,//路由传参接收到的
            desc:{}
        }
    },
    created(){
        this.getdesc()
    },
    methods:{
        getdesc(){
            this.$http.get('api/goods/getdesc/'+this.id).then(result=>{
                if(result.body.status==0){
                    this.desc=result.body.message[0]
                }
            })
        },
    }
}
</script>

<style lang="scss" >
.big-container{
    h3{
        font-size:16px;
        color:#226aff;
        margin:10px 0;
        text-align:center;
    }
    .container-img{
        img{
            width:100%;//这里让图片生效必须去掉自身作用域的限定scoped
        }
    }
}
</style>
